#ifndef _STONE_ENTITY_H_
#define _STONE_ENTITY_H_

#include "AbstractEntity.h"
#include "StoneData.h"
#include "GameDeviceSingleton.h"

#define GRAVITY -9.8f
#define DELAY_TIME	50
#define RECREATE_TIME	180
#define UNINTERACT_TIME 40

class StoneEntity : public AbstractEntity
{
public:
	int life;
	//************************************
	// Method:    StoneEntity
	// FullName:  StoneEntity::StoneEntity
	// Access:    public 
	// Returns:   
	// Qualifier:
	// Parameter: int id
	// Parameter: int type
	// Parameter: double x
	// Parameter: double y
	//************************************
	StoneEntity(int id, int type, double x, double y);

	//************************************
	// Method:    update
	// FullName:  StoneEntity::update
	// Access:    virtual public 
	// Returns:   void
	// Qualifier:
	// Parameter: long time
	//************************************
	virtual void update(long time);

	//************************************
	// Method:    draw
	// FullName:  StoneEntity::draw
	// Access:    virtual public 
	// Returns:   void
	// Qualifier:
	// Parameter: long time
	//************************************
	virtual void draw(long time);

	//************************************
	// Method:    getAbstractData
	// FullName:  StoneEntity::getAbstractData
	// Access:    virtual public 
	// Returns:   AbstractData*
	// Qualifier:
	//************************************
	virtual AbstractData* getAbstractData();

	//************************************
	// Method:    updateData
	// FullName:  StoneEntity::updateData
	// Access:    virtual public 
	// Returns:   void
	// Qualifier:
	// Parameter: int actions
	// Parameter: int effect
	//************************************
	virtual void updateData(int actions, int effect);

	~StoneEntity();

private:
	StoneData* _data;
	int _count;
	int _uninteractTime;
	int _delayTime;
	double _x0;
	double _y0;

	//************************************
	// Method:    _recreate
	// FullName:  StoneEntity::_recreate
	// Access:    private 
	// Returns:   void
	// Qualifier:
	//************************************
	void _recreate();

};

#endif